#include<iostream>
#include<conio.h>
#include<stdio.h>
using namespace std;
class A
{
public:
	void x()
	{
		cout<<"I am x"<<endl;
	}
};
class B:public A
{
	void x()
	{
		cout<<"I am xx"<<endl;
	}
	void y()
	{
		cout<<"I am y"<<endl;
	}
};
void Show(A *a)
{
	a->x();
}
void main()
{
	A *a=new A();
	Show(a);
	B *b=new B();
	Show(a);
	system("pause");
}